\documentclass{article}
\usepackage{xeCJK}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{setspace}

\setCJKmainfont{STKaiti}

\setcounter{tocdepth}{2}

\begin{document}

\doublespacing
\tableofcontents
\singlespacing
\newpage


\section{Section1}
hello
\subsection{subsection1}
subseciton
\subsubsection{subsubsection1}
subsubsection1

\begin{figure}[h!]
    \includegraphics[width=\linewidth]{apple.jpg}
    \caption{An apple.}
    \label{fig:apple1}
\end{figure}

\begin{figure}[h!]
   \centering
   \begin{subfigure}[b]{0.4\linewidth}
        \includegraphics[width=\linewidth]{apple.jpg}
        \caption{Apple.}
   \end{subfigure}
   \begin{subfigure}[b]{0.4\linewidth}
        \includegraphics[width=\linewidth]{apple.jpg}
        \caption{Another apple.}
   \end{subfigure}
   \caption{More apples.}
   \label{fig:apple2}
\end{figure}

\newpage
\begin{appendix}
\listoffigures
\end{appendix}

\end{document}